package com.fishery.processing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fishery.processing.entity.Factory;
import com.fishery.processing.entity.root.FactoryRootVo;
import com.fishery.processing.entity.vo.FactoryMessageVo;
import com.fishery.processing.entity.vo.FactoryOfBaseVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2021-01-14
 */
public interface FactoryMapper extends BaseMapper<Factory> {

    public FactoryOfBaseVo findFactoryMessageOfBase(String baseId);

    public List<FactoryMessageVo> findFactoryMessageOfAll();

    @Select("SELECT processing_factory_name AS factory_name, base_id FROM t_processing_factory_info WHERE id = #{factoryId}")
    public FactoryRootVo getFactoryRootVoById(String factoryId);
}
